# Author:Li
from django.conf.urls import url
from django.urls import path
from apps.organizations.views import OrgView, AddAskView, OrgHomeView, OrgTeacherView, OrgCourseView, OrgDescView, \
    TeacherView, TeacherDetailView

urlpatterns = (
    url(r'^list/$', OrgView.as_view(), name="list"),
    url(r'^add_ask/$', AddAskView.as_view(), name="add_ask"),
    url(r"^(?P<org_id>\d+)/$", OrgHomeView.as_view(), name="home"),
    # 机构首页
    # 获取url参数，设置变量传递给后端org_id
    # path('<int:org_id>/', OrgHomeView.as_view(), name="home"),
    url(r"^(?P<org_id>\d+)/teacher/$", OrgTeacherView.as_view(), name="teacher"),
    # 机构讲师
    url(r"^(?P<org_id>\d+)/course/$", OrgCourseView.as_view(), name="course"),
    # 机构课程
    url(r"^(?P<org_id>\d+)/desc/$", OrgDescView.as_view(), name="desc"),
    # 结构介绍
    url(r'^teachers/$', TeacherView.as_view(), name="teachers"),
    # 教师列表
    url(r'^teachers/(?P<teacher_id>\d+)/$', TeacherDetailView.as_view(), name="teacher_detail"),


)
